# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=krfb
pkgver=23.08.4
pkgrel=0
arch="all !armhf"
url="https://kde.org/applications/internet/org.kde.krfb"
pkgdesc="Desktop sharing"
license="GPL-3.0-or-later AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	kcompletion5-dev
	kconfig5-dev
	kcoreaddons5-dev
	kcrash5-dev
	kdbusaddons5-dev
	kdnssd5-dev
	kdoctools5-dev
	ki18n5-dev
	knotifications5-dev
	kpipewire-dev
	kwallet5-dev
	kwayland5-dev
	kwidgetsaddons5-dev
	kxmlgui5-dev
	libvncserver-dev
	pipewire-dev
	plasma-wayland-protocols
	qt5-qtbase-dev
	qt5-qtx11extras-dev
	samurai
	xcb-util-dev
	xcb-util-image-dev
	"
_repo_url="https://invent.kde.org/network/krfb.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/krfb-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
4aaec6eeaecf0d34a30afcbd29dd50ca27ca42e6b4cb7c053e8d66878ad542cab61ec4603730af943eb7c668b655e43b4b1fe1045738e5d453bc417ee5dcf113  krfb-23.08.4.tar.xz
"
